Developer Documentation

QuickTime 4 API Documentation

Wired Movies and Sprites

| Previous | Chapter Contents | Chapter Top | Next |

Adding Images to the Key Frame Sample

The AddPICTImageToKeyFrameSample function ( Listing 3-3 ) adds images to the key frame sample.

Listing 3 Adding images to the key frame sample

// add images to the key frame sample
    AddPICTImageToKeyFrameSample(mySample, kGoToBeginningButtonUp,
                &myKeyColor, kGoToBeginningButtonUpIndex, NULL, NULL);
    AddPICTImageToKeyFrameSample(mySample, kGoToBeginningButtonDown,
                &myKeyColor, kGoToBeginningButtonDownIndex, NULL, NULL);
    AddPICTImageToKeyFrameSample(mySample, kGoToEndButtonUp, &myKeyColor,
                                    kGoToEndButtonUpIndex, NULL, NULL);
...
    AddPICTImageToKeyFrameSample(mySample, kPenguinForward, &myKeyColor,
                                    kPenguinForwardIndex, NULL, NULL);
    AddPICTImageToKeyFrameSample(mySample, kPenguinLeft, &myKeyColor,
                                    kPenguinLeftIndex, NULL, NULL);
    AddPICTImageToKeyFrameSample(mySample, kPenguinRight, &myKeyColor,
                                    kPenguinRightIndex, NULL, NULL);
    AddPICTImageToKeyFrameSample(mySample, kPenguinClosed, &myKeyColor,
                                    kPenguinClosedIndex, NULL, NULL);

    for (myIndex = kPenguinDownRightCycleStartIndex, myResID =
        kWalkDownRightCycleStart; myIndex <= kPenguinDownRightCycleEndIndex;
        myIndex++, myResID++)
    AddPICTImageToKeyFrameSample(mySample, myResID, &myKeyColor, myIndex,
                                    NULL, NULL);


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |